package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the per_tng_plan database table.
 * 
 */
@Entity
@Table(name="per_tng_plan")
@NamedQuery(name="PerTngPlan.findAll", query="SELECT p FROM PerTngPlan p")
public class PerTngPlan implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="PER_TNG_PLAN_PLANID_GENERATOR", sequenceName="SEQ1",allocationSize=1,initialValue=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PER_TNG_PLAN_PLANID_GENERATOR")
	private int planid;

	private String plandd;

	private String planfs;

	private Timestamp planmaxd;

	private String planname;

	private Timestamp plannind;

	private String plannr;

	private String planstate;

	private String plants;

	private String planyy;

	//bi-directional many-to-one association to PerPmsEmp
	@ManyToOne
	@JoinColumn(name="PER_EMPID")
	private PerPmsEmp perPmsEmp1;

	//bi-directional many-to-one association to PerPmsEmp
	@ManyToOne
	@JoinColumn(name="EMPID")
	private PerPmsEmp perPmsEmp2;

	//bi-directional many-to-one association to PerTngPojs
	@OneToMany(mappedBy="perTngPlan")
	private List<PerTngPojs> perTngPojs;

	public PerTngPlan() {
	}

	public int getPlanid() {
		return this.planid;
	}

	public void setPlanid(int planid) {
		this.planid = planid;
	}

	public String getPlandd() {
		return this.plandd;
	}

	public void setPlandd(String plandd) {
		this.plandd = plandd;
	}

	public String getPlanfs() {
		return this.planfs;
	}

	public void setPlanfs(String planfs) {
		this.planfs = planfs;
	}

	public Timestamp getPlanmaxd() {
		return this.planmaxd;
	}

	public void setPlanmaxd(Timestamp planmaxd) {
		this.planmaxd = planmaxd;
	}

	public String getPlanname() {
		return this.planname;
	}

	public void setPlanname(String planname) {
		this.planname = planname;
	}

	public Timestamp getPlannind() {
		return this.plannind;
	}

	public void setPlannind(Timestamp plannind) {
		this.plannind = plannind;
	}

	public String getPlannr() {
		return this.plannr;
	}

	public void setPlannr(String plannr) {
		this.plannr = plannr;
	}

	public String getPlanstate() {
		return this.planstate;
	}

	public void setPlanstate(String planstate) {
		this.planstate = planstate;
	}

	public String getPlants() {
		return this.plants;
	}

	public void setPlants(String plants) {
		this.plants = plants;
	}

	public String getPlanyy() {
		return this.planyy;
	}

	public void setPlanyy(String planyy) {
		this.planyy = planyy;
	}

	public PerPmsEmp getPerPmsEmp1() {
		return this.perPmsEmp1;
	}

	public void setPerPmsEmp1(PerPmsEmp perPmsEmp1) {
		this.perPmsEmp1 = perPmsEmp1;
	}

	public PerPmsEmp getPerPmsEmp2() {
		return this.perPmsEmp2;
	}

	public void setPerPmsEmp2(PerPmsEmp perPmsEmp2) {
		this.perPmsEmp2 = perPmsEmp2;
	}

	public List<PerTngPojs> getPerTngPojs() {
		return this.perTngPojs;
	}

	public void setPerTngPojs(List<PerTngPojs> perTngPojs) {
		this.perTngPojs = perTngPojs;
	}

	public PerTngPojs addPerTngPoj(PerTngPojs perTngPoj) {
		getPerTngPojs().add(perTngPoj);
		perTngPoj.setPerTngPlan(this);

		return perTngPoj;
	}

	public PerTngPojs removePerTngPoj(PerTngPojs perTngPoj) {
		getPerTngPojs().remove(perTngPoj);
		perTngPoj.setPerTngPlan(null);

		return perTngPoj;
	}

}